<template>
      <div class="container eval">
          <cell title="评分">
             <rater v-model="des" :max="5" active-color="#ffd833"></rater>
          </cell>
          <x-textarea :max="120" :height="160" placeholder="请输入您的评价" v-model="content"></x-textarea>

               <cell title="" value="你的评价可以帮助到其他小伙伴哟" disabled is-link></cell>

          <div class="btn" @click="gosubmit">发布</div>
      </div>
</template>
<script>
  import axios from '@/api/request'
  import { XTextarea, Rater,Cell,Group} from "vux";
 import { mapState,mapGetters } from "vuex";
  
export default {
    components: {
      XTextarea, Rater,Cell,Group
    },
    data () {
      return {
          content:'',
          des:'5'
      }
    },
     mounted(){
    },
    methods:{
       gosubmit(){
           let data={
               type:this.$route.query.indentType,
               des:this.des.toString(),
               content:this.content,
               Id:this.$route.query.id
           }
          
        axios('/device/appraises/saves','post',data).then(res=>{
          console.log(res)
          if(res.data.code==1000){
            console.log(res)
            this.$vux.toast.text("成功")
            this.$router.push({ path:'/home'})
     
          }
        })   
       }
    }
    
    }
</script>
<style>
    .eval .weui-cell{
  background: #fff;
}
</style>
<style scoped lang="less">
 .btn{
      margin: 0 50rem/75;
      margin-top: 60rem/75;
      height: 90rem/75;
      line-height: 90rem/75;
      border-radius: 6px;
      background: rgb(255,218,68);
      color: #000;
      text-align: center;
      font-size: 18px;
    }
  .container{
      height:100%;
      width:100%;
      background: #f5f5f5;
  }
</style>
